package pwr.online.cow.model;

public class Position2D extends Position {
	private int x, y;
	
	public Position2D(int x, int y) {
		this.x = x;
		this.y = y;
	}
	
	public void setX(int x) {
		this.x = x;
	}
	
	public void setY(int y) {
		this.y = y;
	}
	
	public int getX() {
		return x;
	}
	
	public int getY() {
		return y;
	}
	
	@Override
	public boolean equals(Object obj) {
		if (obj instanceof Position2D) {
			Position2D p = (Position2D) obj;
			return x == p.x && y == p.y;
		}
		return super.equals(obj);
	}

}
